import VoiceStep from './voice'; type PreToolSpeechMode = 'auto' | 'static' | 'off'; type ToolCallSound = 'typing' | 'none'; type ToolCallSoundBehavior = 'always' | 'with_pre_speech'; type SoftTimeoutMode = 'static' | 'auto'; interface ToolCallFeedbackConfig { enabled: boolean; pre_tool_speech: PreToolSpeechMode; pre_tool_speech_phrases: string[]; tool_call_sound: ToolCallSound; tool_call_sound_behavior: ToolCallSoundBehavior; delay_seconds: number; } interface PerToolConfig { enabled?: boolean | null; pre_tool_speech?: PreToolSpeechMode | null; pre_tool_speech_phrases?: string[] | null; tool_call_sound?: ToolCallSound | null; tool_call_sound_behavior?: ToolCallSoundBehavior | null; delay_seconds?: number | null; } interface SoftTimeoutConfig { timeout_seconds: number; phrases: string[]; mode: SoftTimeoutMode; } type ToolResponseMode = 'sync' | 'async' | 'none'; interface Handler { name: string; description: string; parameters: string; feedback?: PerToolConfig; timeout_seconds?: number | string | null; response_mode?: ToolResponseMode | string | null; } interface SubagentTool { name: string; description: string; parameters: string; feedback?: PerToolConfig; timeout_seconds?: number | string | null; response_mode?: ToolResponseMode | string | null; } interface AgentServiceConfig { provider: string; model: string; api_key?: string; options?: Record; } type SubagentContextMode = 'own' | 'shared'; interface Subagent { id: string; name: string; system_instruction: string; developer_messages?: string[]; context?: SubagentContextMode; llm?: Partial | null; tools: SubagentTool[]; exitId?: string; } interface AgentSystemToolConfig { name: string; description?: string; parameters?: Record; } interface INPUT { handlers: Handler[]; subagents: Subagent[]; system_instruction: string; developer_messages: string[]; greeting_message: string; prevent_greeting_interruption: boolean; idle_detection_enabled: boolean; idle_timeout_secs: number | string; idle_max_retries: number | string; idle_prompts: Array; idle_goodbye_message: string; dtmf_enabled: boolean; dtmf_timeout: number | string; dtmf_termination_digit: string; dtmf_prefix: string; custom_config_enabled: boolean; agent_url_overwritten: boolean; agent_url: string; mode: string; stt: Partial; llm: Partial; tts: Partial; realtime: Partial; tool_feedback?: ToolCallFeedbackConfig; soft_timeout?: SoftTimeoutConfig; system_tools?: AgentSystemToolConfig[]; } export default class VoiceAgent extends VoiceStep> { runStep(): Promise; private normalizeIdlePrompts; private serializeTool; private serializeSubagents; private findSubagentForTool; private findSubagentByName; private resolveSubagentExit; private findExitByLabel; private validateToolFeedback; private isStepFlagEnabled; private isValidAgentUrl; private buildAgentServiceConfig; private validatePerToolFeedback; private validateSoftTimeout; private validateSystemTools; private parseAgentServiceOptions; exitToThread(): Promise; } export {};